<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>switch</title>
</head>

<body>
    <script>
        var x = Number(prompt("请输入您要查询的业务"));
        var a, b;
        a = 50;
        b = 70;
        switch (x) {
            case 1: alert('账号余额'); break;
            case 2: alert('转账余额'); break;
            case 3: alert('信用额度'); break;
            default:
                alert('推出');
        }
        var z = (a >= 60) ? '及格' : '不及格';
        var m = (b >= 60) ? '及格' : '不及格';
       alert(z);
       alert(m);
    </script>
</body>

</html>